import ItemUtil from '@/ItemUtil';
import RandomUtil from '@/RandomUtil';
export default class Item_金箍棒 {
    static id = 'horl';
    static 名称: string = '金箍棒';
    static 描述: string = '';
    static 图标: string = '';
    static 添加技能(目标: unit) {
        UnitAddAbility(目标, Item_金箍棒.id);
    }
    static 释放(x: number, y: number, 来源?: unit, 目标?: unit, d?: any) {}
    constructor() {
        EventManager.onBeforApplyAttack(Item_金箍棒.spellEffect);
    }
    static spellEffect(d: DamageEventData) {
        if (!ItemUtil.isUnitHasItem(d.source, Item_金箍棒.id)) return;
        let r = RandomUtil.randomPercent();
        if (r <= 0.75) {
            d.ignoreDogge = true;
            DamageSystemInstance.applyEarthDamage(d.target, d.source, 150);
        }
    }
}
